package com.ruoyi.supermarket.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.supermarket.mapper.XqsaleMapper;
import com.ruoyi.supermarket.domain.Xqsale;
import com.ruoyi.supermarket.service.IXqsaleService;

/**
 * 销售详情Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-28
 */
@Service
public class XqsaleServiceImpl implements IXqsaleService
{
    @Autowired
    private XqsaleMapper xqsaleMapper;

    /**
     * 查询销售详情
     * 
     * @param xqsaleId 销售详情主键
     * @return 销售详情
     */
    @Override
    public Xqsale selectXqsaleByXqsaleId(Long xqsaleId)
    {
        return xqsaleMapper.selectXqsaleByXqsaleId(xqsaleId);
    }

    /**
     * 查询销售详情列表
     * 
     * @param xqsale 销售详情
     * @return 销售详情
     */
    @Override
    public List<Xqsale> selectXqsaleList(Xqsale xqsale)
    {
        return xqsaleMapper.selectXqsaleList(xqsale);
    }


    /**
     * 新增销售详情
     * 
     * @param xqsale 销售详情
     * @return 结果
     */
    @Override
    public int insertXqsale(Xqsale xqsale)
    {
        return xqsaleMapper.insertXqsale(xqsale);
    }

    /**
     * 修改销售详情
     * 
     * @param xqsale 销售详情
     * @return 结果
     */
    @Override
    public int updateXqsale(Xqsale xqsale)
    {
        return xqsaleMapper.updateXqsale(xqsale);
    }

    /**
     * 批量删除销售详情
     * 
     * @param xqsaleIds 需要删除的销售详情主键
     * @return 结果
     */
    @Override
    public int deleteXqsaleByXqsaleIds(Long[] xqsaleIds)
    {
        return xqsaleMapper.deleteXqsaleByXqsaleIds(xqsaleIds);
    }

    /**
     * 删除销售详情信息
     * 
     * @param xqsaleId 销售详情主键
     * @return 结果
     */
    @Override
    public int deleteXqsaleByXqsaleId(Long xqsaleId)
    {
        return xqsaleMapper.deleteXqsaleByXqsaleId(xqsaleId);
    }

    @Override
    public List<Xqsale> selectXqsaleListProfit(Xqsale xqsale) {
        return xqsaleMapper.selectXqsaleListProfit(xqsale);
    }
}
